package com.hwd.gmall.item.feign;

import com.hwd.gmall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * 商品详情微服务的feign接口
 *
 * @author 黄伟东/Victor
 * @date 2022/4/25 18:33
 */
@FeignClient(value = "service-item", path = "/api/item")
@Service(value = "itemFeignClient")
public interface ItemFeignClient {

    /**
     * 查询sku的详细信息,用于生成sku的详情页面
     *
     * @param skuId skuId
     * @return java.util.Map<java.lang.String,java.lang.Object>
     */
    @GetMapping(value = "/getItemInfo/{skuId}")
    Map<String, Object> getItemInfo(@PathVariable(value = "skuId") Long skuId);
}
